-
Notifications
You must be signed in to change notification settings - Fork 2
Sync up of many additions, incl. documentation and new sample apps #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bvandewe
wants to merge
365
commits into
neuroglia-io:main
Choose a base branch
from
bvandewe:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Configure Parcel bundler with single entry points (app.js, main.scss) - Create comprehensive Mario's Pizzeria SCSS with Bootstrap integration - Update package.json with proper build scripts outputting to static/dist/ - Add .gitignore entries for Parcel cache and build artifacts - Create .parcelrc for explicit transformer configuration - Add IMPLEMENTATION_PLAN.md with complete 5-phase roadmap - Add QUICK_START.md for developer reference - Successful build test: 27.58 kB JS, 223.18 kB CSS Next: Phase 2 - Authentication infrastructure
- Create ui/templates/auth/login.html with Mario's Pizzeria branding - Update ui/templates/layouts/base.html to remove Exam Record Manager references - Replace with Mario's Pizzeria navigation, footer, and styling - Update ui/templates/home/index.html with pizza-themed homepage - Add pizza emoji favicon and proper Bootstrap Icons integration - Use Parcel-built assets from /static/dist/ Next: Phase 5 - Integration with main.py
- Add SessionMiddleware to ui_app for cookie-based authentication - Configure Jinja2Templates for server-side rendering - Register ui.controllers for auth and home controllers - Mount UI app at root (/) and API app at /api - Create ui/static directory structure for Parcel assets - Update startup messages with login URL and credentials - Update poetry lock with auth dependencies (pyjwt, passlib, itsdangerous, python-multipart) Ready for Docker testing with hot reload
- Add jinja2 ^3.1.0 to pyproject.toml dependencies - Update poetry.lock - Update PROGRESS.md with all completed phases - Mark implementation as COMPLETE - All phases (1-5) successfully implemented - Application running in Docker at http://localhost:8080/ - Demo credentials: demo/demo123
- Create IMPLEMENTATION_SUMMARY.md with complete overview - Document architecture, file structure, and flows - List all commits and phases - Include testing checklist and next steps - Provide production security recommendations - Total: ~1000 lines of production-ready code across 5 phases
- Remove separate ui_app FastAPI instance - Register UI controllers directly to main app (not mounted) - Session middleware and templates now on main app - API app still mounted at /api prefix - Eliminates FastAPI mount-at-root routing issues - UI routes now accessible at root (/, /auth/login, etc.) - Cleaner architecture with proper route resolution
- Add extra='ignore' to SettingsConfigDict - Fixes validation error when Docker env vars are present - Allows flexibility for deployment environments
- Change from self.router.prefix to self.prefix (correct ControllerBase API) - HomeController now serves at root (/) instead of /home/ - UIAuthController now serves at /auth/* instead of /uiauth/* - Follows ControllerBase documentation pattern
- Restore separate ui_app mounted at root (/) - Restore api_app mounted at /api - Keep ApplicationSettings with extra='ignore' fix (from c918cfb) - Original architecture WAS working - issue was only Settings validation - ui_app at root properly handles all UI routes - No need for complex prefix overrides
The issue was that ControllerBase sets the router prefix based on the class name in super().__init__(), which happens AFTER the child class __init__ finishes. Solution: Override the Routable.__init__() call directly to set the correct prefix: - HomeController: prefix="" for root routes (/) - UIAuthController: prefix="/auth" for auth routes This ensures routes are correctly registered as: - / (home page) - /auth/login (login page) - /auth/logout (logout) Instead of the incorrect: - /home/ (due to HomeController name) - /uiauth/login (due to UIAuthController name)
Removed unnecessary imports from inside __init__() methods. All imports (Routable, generate_unique_id_function, JsonSerializer) are now at the module level where they belong. The original pattern was copied from ControllerBase which uses a late import to avoid circular dependencies, but that's not needed in these child controllers since we're not calling super().__init__().
…ersistence - Add comprehensive OpenTelemetry observability module with tracing, metrics, and logging - Enhance CQRS tracing with automatic instrumentation via TracingPipelineBehavior - Add CloudEvent decorator system and publisher infrastructure for event-driven architecture - Improve data abstractions with timezone-aware UTC timestamps and VersionedState - Add enhanced MongoDB repository with bulk operations, aggregation, and type handling - Enhance dependency injection and service lifetimes with improved documentation - Add metrics middleware for CQRS operations with duration histograms - Enhance JSON serialization with intelligent type handling and configurable discovery - Update CHANGELOG with comprehensive framework enhancements documentation
…ervability - Complete hybrid authentication system (session + JWT) - Full-featured management dashboard with analytics and operations monitoring - Real-time kitchen and delivery dashboards with WebSocket integration - Comprehensive user profile management with automatic account creation - Advanced menu management with pizza customization - Multi-role access control (customer, chef, delivery driver, manager) - Complete UI/API separation architecture with modern Parcel build system - Extensive observability integration with custom CQRS metrics - MongoDB integration with optimized repositories and queries - Reorganize sample files into organized minimal/ directory structure
- Complete Grafana dashboards for business operations, CQRS performance, and system monitoring - Keycloak authentication server with automated realm configuration - Prometheus metrics collection with Neuroglia framework integration - Loki log aggregation with structured logging support - Tempo distributed tracing with OpenTelemetry integration - MongoDB setup with Mario's Pizzeria database initialization - Docker Compose orchestration for full observability stack - Production-ready deployment scripts and configuration management
…ation - Restructure notes/ directory with logical category-based organization - Create dedicated sections for API, architecture, data, framework, and observability - Organize Mario's Pizzeria implementation notes by category (guides, implementation, infrastructure, UI) - Add comprehensive README files for navigation and documentation discovery - Update project configuration files (.gitignore, .prettierrc, VS Code settings) - Consolidate framework migration notes and version management documentation - Establish clear documentation patterns for future development reference
- Avoid DI auto-construction of generic types - Extract entity type from implementation's base classes - Properly instantiate custom repositories with dependencies - Prevents 'Failed to resolve service str' error
- Extract reconciliation setup to _configure_reconciliation - Extract custom setup pattern to _configure_with_custom_setup - Extract mongo configuration to _configure_mongo_repositories - Extract motor configuration to _configure_motor_repositories - Extract motor queryable registration to _register_motor_queryable_types - Extract custom mappings to _register_custom_repository_mappings - Improves readability and maintainability
- Document ReadModel.configure refactoring for maintainability - Document custom repository mappings factory function fix - Add details about improved code structure
- Added to_list_async() method that executes queries and returns list of deserialized entities - Added first_or_default_async(predicate) method for retrieving first element or None - Updated MotorQueryProvider to accept JsonSerializer for entity deserialization - Implemented _deserialize_entity() method to convert MongoDB dicts to entity instances - Updated all tests to pass serializer to MotorQueryProvider - Added comprehensive test coverage for async methods (3 new tests) This fixes a critical API gap where documentation referenced to_list_async() throughout examples but the method didn't exist. Users following documentation would encounter AttributeError when trying to use these methods. All 17 tests now pass successfully.
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
…onfiguration
- Added database_name and consumer_group parameters to WriteModel constructor
- Internally calls ESEventStore.configure() when database_name is provided
- Eliminates need for separate ESEventStore.configure() call in application startup
- Added delete_mode parameter for direct configuration (cleaner than EventSourcingRepositoryOptions)
- Backwards compatible: legacy options parameter still supported
- Added 4 comprehensive tests for new functionality
This simplifies the data access layer configuration from:
ESEventStore.configure(builder, EventStoreOptions(db, group))
DataAccessLayer.WriteModel(options=...).configure(builder, modules)
To:
DataAccessLayer.WriteModel(
database_name=db,
consumer_group=group,
delete_mode=DeleteMode.HARD
).configure(builder, modules)
All new tests pass (4/4). Aligns WriteModel API with ReadModel pattern.
- Fix _get_lambda_source_code() to process first line only - Strip trailing backslashes from continuation lines - Prepend dummy identifier for lines starting with '.' - Update where(), order_by(), order_by_descending(), select() - Add comprehensive test suite (18 tests, 13 passing)
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
- Store _element_type explicitly in Queryable instances - Update get_element_type() to check _element_type before __orig_class__ - Propagate element_type through create_query() in all providers - Fixes AttributeError when chaining .where().order_by() etc.
…, projection, count, exists) - Enhanced find_async with optional sort, limit, skip, projection - Added count_async for document counting (pagination support) - Added exists_async for efficient existence checks - Maintains full backward compatibility
…xist - EventSourcingRepository.get_async now returns None instead of raising exception - Handles both stream-not-found exceptions and empty event lists - Added comprehensive unit tests for all scenarios - Follows standard Repository pattern conventions
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
The Aggregator.aggregate() method uses object.__new__() to bypass __init__, which left _pending_events uninitialized. This caused AttributeError when reconstituted aggregates tried to register new domain events. Changes: - Added explicit aggregate._pending_events = list() initialization - Added comprehensive docstring explaining __new__() bypass pattern - Created 7 comprehensive tests covering all scenarios Fixes event-sourced aggregates ability to register new domain events after reconstitution from event streams. Tests: tests/cases/test_aggregator_pending_events_initialization.py
- Add AggregateEventQueue for causal event ordering - Prevent race conditions in projection handlers - ReadModelConciliationOptions.sequential_processing option - 15 comprehensive tests for the new feature
- Terminal-only pattern matching for monetary fields - Handle typing.Any properly in _deserialize_nested - Add InvalidOperation to exception handler - 42 comprehensive tests
…(v0.7.8) ## DateTime Detection Improvements - Require 'T' or space separator to distinguish datetime from date-only strings - Date-only strings like '2025-12-15' no longer auto-convert to datetime - Added TypeError to exception handling for non-string inputs - Comprehensive docstring explaining behavior and rationale ## Enum Case-Insensitive Matching - Unified matching logic across _basic_enum_detection and typed enum deserialization - Priority-based matching: exact value > exact name > case-insensitive value > case-insensitive name - Consistent behavior whether using TypeRegistry or fallback detection ## Tests - Added tests/cases/test_json_serializer_hardening.py (46 comprehensive tests) - All 106 serializer tests pass Closes: Preventive hardening for mission-critical serializer
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
… SDK compatibility
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
- configure_structlog() with OTel trace correlation - get_structlog_logger() with fallback to std logging - Context variable binding for request-scoped data - Optional dependency with graceful fallback
- HealthCheckProvider ABC with 5 built-in providers - @track_operation and @track_latency decorators - All providers use lazy imports for flexibility
- Observability.configure() now accepts health_check_providers - Service info gauge created automatically at startup - Updated __init__.py exports for all new types
- CHANGELOG.md documents all 4 CRs - pyproject.toml version updated to 0.9.0
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
mario-pizzeriaas a full featured sample app showcasing most framework features and serving as the base reference implementation for most tests, code illustrations and concepts explanations in the supporting Mkdocs documentationPardon me for the huge MR... I'll try to push more frequently moving forward :)